<!--
  ~ Created by zhangxiangwei on 2020/03/02.
  ~ Copyright 2015－2021 Sensors Data Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!DOCTYPE html>
<html>

<head>
	<title>test</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- <script>
		var serverUrlArr =['url1','url2','url3'];
		var urlIndex = parseInt(Math.random()*3) + 1;
		console.log(urlIndex);
		var useServerUrl = serverUrlArr(urlIndex);
	</script> -->
	<script>
		(function (para) {
			var p = para.sdk_url, n = para.name, w = window, d = document, s = 'script', x = null, y = null;
			if (typeof (w['sensorsDataAnalytic201505']) !== 'undefined') {
				return false;
			}
			w['sensorsDataAnalytic201505'] = n;
			w[n] = w[n] || function (a) { return function () { (w[n]._q = w[n]._q || []).push([a, arguments]); } };
			var ifs = ['track', 'quick', 'register', 'registerPage', 'registerOnce', 'trackSignup', 'trackAbtest', 'setProfile', 'setOnceProfile', 'appendProfile', 'incrementProfile', 'deleteProfile', 'unsetProfile', 'identify', 'login', 'logout', 'trackLink', 'clearAllRegister', 'getAppStatus'];
			for (var i = 0; i < ifs.length; i++) {
				// call 方法传参数 + 闭包 => 向数据发送的队列 _q 中 push 了需要发送的数据 包括 api 名如：track 和 track 方法的参数
				w[n][ifs[i]] = w[n].call(null, ifs[i]);
			}
			if (!w[n]._t) {
				x = d.createElement(s), y = d.getElementsByTagName(s)[0];
				x.async = 1;
				x.src = p;
				x.setAttribute('charset', 'UTF-8');
				w[n].para = para;
				y.parentNode.insertBefore(x, y);
			}
		})({
			sdk_url: 'testselect.js',
			heatmap_url: './heatmap.full.js',
			name: 'sensors',
			source_channel: ['gz', 'adid'],
			max_referrer_string_length: 500,
			use_app_track: false,
			// send_type: 'beacon',
			// use_client_time: true,
			// is_track_single_page: true,
			// cross_subdomain: false,
			// batch_send: true,
			// preset_properties: {
			// 	//是否采集$latest_utm最近一次广告系列相关参数，默认值true
			// 	latest_utm: true,
			// 	//是否采集$latest_traffic_source_type最近一次流量来源类型，默认值true
			// 	latest_traffic_source_type: true,
			// 	//是否采集$latest_search_keyword最近一次搜索引擎关键字，默认值true
			// 	latest_search_keyword: true,
			// 	//是否采集$latest_referrer最近一次前向地址，默认值true
			// 	latest_referrer: true,
			// 	//是否采集$latest_referrer_host最近一次前向地址，1.14.8以下版本默认是true，1.14.8及以上版本默认是false，需要手动设置为true开启
			// 	latest_referrer_host: true,
			// 	//是否采集$latest_landing_page最近一次落地页地址，默认值false
			// 	latest_landing_page: true,
			// 	//是否采集 $url 页面地址作为公共属性，默认值false
			// 	url: true
			// },
			server_url: 'http://liuxing2.debugbox.sensorsdata.cn/sa?project=guozheng',

			heatmap: {}
		});
		// sensors.identify('test88888');

		// sensors.registerPage({
		// 	user_name: 'gz'
		// });
		// // sensors.setProfile({ user_age: '28' });
		// sensors.identify('55555555');
		// sensors.identify('1170899b788048c');
		sensors.quick('autoTrack');
		// sensors.quick('autoTrackWithoutProfile');
		sensors.track('userLogin', {});
		// sensors.login('18955468888');
		// sensors.quick('isReady', function () {
		// 	console.log('我的$url是：' + sensors.getPresetProperties().$url);
		// });

		// sensors.quick('autoTrackWithoutProfile');
		// sensors.track('test', {'$utm_source':'new11'});
	</script>
	<style>
		button {
			margin-top: 2000px;
		}
	</style>
	<!-- GrowingIO Analytics code version 2.1 -->
	<!-- Copyright 2015-2017 GrowingIO, Inc. More info available at http://www.growingio.com -->
	<!-- <script type='text/javascript'>
		!function (e, t, n, g, i) { e[i] = e[i] || function () { (e[i].q = e[i].q || []).push(arguments) }, n = t.createElement("script"), tag = t.getElementsByTagName("script")[0], n.async = 1, n.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + g, tag.parentNode.insertBefore(n, tag) }(window, document, "script", "assets.giocdn.com/2.1/gio.js", "gio");
		gio('init', '913aba5607a1c59c', {});

		//custom page code begin here

		//custom page code end here

		gio('send');

	</script> -->
	<!-- End GrowingIO Analytics code version: 2.1 -->
</head>

<body>
	<p data-sensors-click >测试</p>
	<a href="http://www.gz.com:8182/index2.html?gz=789">去http://www.gz.com:8182/index2.html?gz=789</a>
	<div data-sensors-click id="456">
		<div data-sensors-click id="123">
			<input data-sensors-click id="3456789" name='我的input' placeholder="测试点击input内容采集情况" />
		</div>
		<input placeholder="测试点击input内容采集情况" />
	</div>
	<input data-sensors-click placeholder="测试点击input内容采集情况" />
	<br>
	<div id="testgz" data-sensors-click style="display:inline-block;height:200px;width:200px;background-color:aquamarine;">
		<a href="#" target="">baidu</a>
	</div>

	<br>
	<!-- <a href="javascript:;" id="123" data='test'> 点击按钮触发</a> -->
	<div id="123" sensors-click data='test'
		style="display:inline-block;height:200px;width:200px;background-color:blueviolet;"> 点击按钮触发
	</div>
	<a id="测试123" name='testdisplay'
		style="text-align: center; display:inline-block;width:320px;height:320px;background-color:blue">
		<!-- <div onclick="divclick(this);" style="display:inline-block;width:120px;height:120px;background-color:red">我是内部div,触发点击事件</div> -->
		<div style="text-align: center;display:inline-block;width:220px;height:220px;background-color:green">
			我是内部div1,触发点击事件
			<li data-sensors-click style="display:inline-block;width:120px;height:120px;background-color:red">我是内部div2,触发点击事件</li>
		</div>
	</a>

	<div data-sensors-click id="测试123555555" name='testdisplay'
		style="text-align: center; display:inline-block;width:320px;height:320px;background-color:blue">
		<!-- <div onclick="divclick(this);" style="display:inline-block;width:120px;height:120px;background-color:red">我是内部div,触发点击事件</div> -->
		<a style="text-align: center;display:inline-block;width:220px;height:220px;background-color:green">
			我是内部a
		</a>
	</div>
	
	<button>123</button>
	<br>
	<input type="checkbox" style='margin-left:50px;' value='test' name='gz' checked='checked' /> 测试的checkbox点击
	<!-- <a href='https://www.baidu.com' id='gobaidu' name='gobaidu' event='gztest' target="_blank">百度一下</a> -->
</body>

</html>